﻿#region imports

using System;
using System.Collections.Generic;
using System.Data.Services;
using System.Data.Services.Common;
using Microsoft.Data.Services.Toolkit.QueryModel;

#endregion

namespace Codeplex.ODataTFS.Model.Entities
{
	[DataServiceKey("Id")]
	[ETag("CreationDate")]
	[EntityPropertyMapping("CreationDate", SyndicationItemProperty.Updated, SyndicationTextContentKind.Plaintext, true)]
	[EntityPropertyMapping("ArtifactUri", SyndicationItemProperty.Title, SyndicationTextContentKind.Plaintext, true)]
	[EntityPropertyMapping("Comment", SyndicationItemProperty.Summary, SyndicationTextContentKind.Plaintext, true)]
	public class Changeset
	{
		public int Id { get; set; }

		public string ArtifactUri { get; set; }

		public string Comment { get; set; }

		public string Committer { get; set; }

		public DateTime CreationDate { get; set; }

		public string Owner { get; set; }

		public string Branch { get; set; }

		public string WebEditorUrl { get; set; }

		[ForeignProperty]
		public IEnumerable<Change> Changes { get; set; }

		[ForeignProperty]
		public IEnumerable<WorkItem> WorkItems { get; set; }
	}
}
